package com.huashi.dealer.modular.business.goods.param;

import com.huashi.dealer.commonEntity.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 商品详情表
 * 对应PHP的Goods模型
 */
@Data
@Schema(description = "商品详情")
public class GoodsDetail extends Goods {
    
    @Schema(description = "商品状态")
    private GoodStatusVo goodStatus;
    
    @Schema(description = "商品主图")
    private String goodsImage;
    
    @Schema(description = "商品规格")
    private GoodsSku goodsSku;
    
    @Schema(description = "是否参与会员等级折扣")
    private boolean isUserGrade;
    
    @Schema(description = "商品分类")
    private Category category;
    
    @Schema(description = "商品图片列表")
    private List<UploadFile> images;
    
    @Schema(description = "商品规格列表")
    private List<GoodsSku> sku;
    
    @Schema(description = "商品评价数据")
    private List<Comment> commentData;
    
    @Schema(description = "商品销量")
    private int goodsSaless;

    @Schema(description = "是否会员等级折扣")
    private boolean isBooleanUserGrade;
    /**
     * 商品状态VO
     */
    @Data
    @Schema(description = "商品状态")
    public static class GoodStatusVo{
        @Schema(description = "状态文本")
        private String text;
        
        @Schema(description = "状态值")
        private String value;
    }
}